const {
  createProxyMiddleware
} = require('http-proxy-middleware');

// http://localhost:1234/login


module.exports = app => {
  app.use('/api', createProxyMiddleware({
    target: 'http://localhost:1234',
    changeOrigin: true,
    pathRewrite: {
      '/api': ""
    }
  }))
}